package com.hzzy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hzzy.IDao.HzClassesMapper;
import com.hzzy.bean.HzClasses;
import com.hzzy.bean.HzClassesExample;
import com.hzzy.service.HzClassesService;

@Service
public class HzClassesServiceImpl implements HzClassesService {

	@Autowired
	private HzClassesMapper hzClassesMapper;
	
	/**
	 * 根据班主任Id，获取对应的班级
	 * @param teacherId
	 * @return
	 */
	public List<HzClasses> getInfoByTeacherId(String teacherId) {
		HzClassesExample example = new HzClassesExample();
		example.createCriteria().andTeacherIdEqualTo(teacherId);
		return hzClassesMapper.selectByExample(example);
	}
	/**
	 * 查询所有班级列表
	 */
	public List<HzClasses> queryAllClass() {
		return hzClassesMapper.queryAllClass();
	}

}
